<?php

namespace app\model;


use app\model\BaseModel;

/**
 * Permission模型
 */
class Permission extends BaseModel{
    protected function getOptions(): array{
        return [];
    }

    /**
     * 多对多 Permission-Role
     */
    public function permissions(){
        return $this->belongsToMany(Role::class, 'role_permission', 'role_id', 'permission_id');
    }
}